<template>
	<view>
<uni-table border stripe emptyText="暂无更多数据" >
    	<!-- 表头行 -->
    	<uni-tr>
    		<uni-th align="center">姓名	</uni-th>
    		<uni-th align="center">预支金额</uni-th>
    		<uni-th align="left">状态</uni-th>
    		<uni-th align="left">发放时间</uni-th>
    		<uni-th align="left">操作</uni-th>
    	</uni-tr>
    	<!-- 表格数据行 -->
    	<uni-tr v-for="item in tableData">
    		<uni-td>{{item.talentName}}</uni-td>
    		<uni-td>{{item.advanceMoney}}</uni-td>
    		<uni-td>{{item.status == 0?'未发放':'已发放'}}</uni-td>
			<uni-td>{{item.grantDate == null ?'':item.grantDate}}</uni-td>
			<uni-td><text class="operate" @click="handleView(item)">查看</text></uni-td>
    	</uni-tr>
   
    
    </uni-table>
	</view>
</template>

<script>
	import {advancePage} from '@/api/yuZhi/yuZhi.js'
	export default {
		data() {
			return {
				tableData:[],
				queryParams:{
					pageNum:1,
					pageSize:10
				}
			}
		},
		mounted() {
			this.advancePage(this.queryParams)
		},
		methods:{
			async advancePage(data){
				let res = await advancePage(data);
				console.log(res,"预支管理")
				if(res.code == 200){
					this.tableData = res.rows
				}
			},
			handleView(item){
					uni.navigateTo({
						url:'/pages/yuZhiDetails/yuZhiDetails?yuZhiDetailsInfo='+encodeURIComponent(JSON.stringify(item))
					})
			},
		}
	}
</script>	

<style scoped>
	.salary-list-container {
	  padding: 10px;
	}
	.table-header,
	.table-body {
	  display: flex;
	  flex-direction: row;
	  border: 1px solid #ccc;
	  margin-bottom: -1px; /* 解决边框重叠问题 */
	}
	.operate {
	  color: #007aff; /* 模拟链接颜色，可根据设计调整 */
	}
</style>